<%@ include file="/WEB-INF/jsp/include.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Home ${user}</title>
</head>
<body>
	<h2>Hello ${user.firstName} ${user.lastName}</h2>
	<h3>Owned communities</h3>
	<c:if test="${not empty owner_communities}">
		<ul>
			<c:forEach var="community" items="${owner_communities}">
				<li><a href="http://localhost:8080/HiJinksComms/welcome/id=${user_id}/request/id=${community.name}">${community.name}</a></li>
			</c:forEach>
		</ul>
	</c:if>
	<h3>Associated communities</h3>
	<c:if test="${not empty member_communities}">
		<ul>
			<c:forEach var="community" items="${member_communities}">
				<li><a href="http://localhost:8080/HiJinksComms/welcome/id=${user_id}/request/id=${community.name}">${community.name}</a></li>
			</c:forEach>
		</ul>
	</c:if>
	<h3>Latest communities</h3>
	<c:if test="${not empty latest_communities}">
		<ul>
			<c:forEach var="community" items="${latest_communities}">
				<li><a href="http://localhost:8080/HiJinksComms/welcome/id=${user_id}/request/id=${community.name}">${community.name}</a></li>
			</c:forEach>
		</ul>
	</c:if>
	<h3>Requests</h3>
	<c:if test="${not empty requests}">
		<ul>
			<c:forEach var="request" items="${requests}">
				<li><a href="http://localhost:8080/HiJinksComms/welcome/id=${user_id}/request/id=${request.id}">Request for you</a></li>
			</c:forEach>
		</ul>
	</c:if>
</body>